//
//  heros.m
//  tableView2
//
//  Created by 楼楚 on 15/11/10.
//  Copyright © 2015年 Chu Lou. All rights reserved.
//

#import "heros.h"

@implementation heros
- (instancetype)initWithDict:(NSDictionary *)dict


{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+ (instancetype)heroWithDict:(NSDictionary *)dict

{
    return [[self alloc]initWithDict:dict];
}

+ (NSArray *)heros
{
    NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"heros.plist" ofType:nil]];
    NSMutableArray *arryM = [NSMutableArray array];
    for (NSDictionary *dict in array) {
        [arryM addObject:[self heroWithDict:dict]];
    }
    return arryM;
}


@end
